package com.df.blueben.constant.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum VisibilityEnum {


    PUBLIC(0),
    PRIVATE(1);
    @EnumValue
    private Integer value;

    public static VisibilityEnum getVisibilityEnum(Integer value) {
        for (VisibilityEnum visibilityEnum : VisibilityEnum.values()) {
            if (visibilityEnum.getValue().equals(value)) {
                return visibilityEnum;
            }
        }
        return null;
    }
}
